﻿using SqlSugar;
using System;

namespace tlBasic.Core
{
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("sys_Tenant", "租户表", IsDisabledUpdateAll = true)]
    public class sys_Tenant : DEntityBase
    {

        /// <summary>
        /// 编码
        /// </summary>
        [SugarColumn(ColumnDescription = "编码")]
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [SugarColumn(ColumnDescription = "名称")]
        public string Name { get; set; }

        /// <summary>
        /// 续费价格
        /// </summary>
        [SugarColumn(ColumnDescription = "续费价格")]
        public decimal YearPrice { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnDescription = "状态")]
        public StatusEnum Status { get; set; } = StatusEnum.Enable;

        /// <summary>
        /// 区域
        /// </summary>
        [SugarColumn(ColumnDescription = "区域")]
        public string Location { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        [SugarColumn(ColumnDescription = "联系人")]
        public string LinkName { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(ColumnDescription = "联系电话")]
        public string LinkPhone { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        [SugarColumn(ColumnDescription = "地址")]
        public string Address { get; set; }

        /// <summary>
        /// 管理员账号
        /// </summary>
        [SugarColumn(ColumnDescription = "管理员账号")]
        public string AdminAccount { get; set; }

        /// <summary>
        /// 注册日期
        /// </summary>
        [SugarColumn(ColumnDescription = "注册日期")]
        public DateTime RegDate { get; set; }

        /// <summary>
        /// 到期日期
        /// </summary>
        [SugarColumn(ColumnDescription = "到期日期")]
        public DateTime ExpireDate { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnDescription = "")]
        public string Domain { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnDescription = "")]
        public string Host { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        [SugarColumn(ColumnDescription = "备注信息")]
        public string Remark { get; set; }

        /// <summary>
        ///  
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string StatusName => Status.GetDescription();
        /// <summary>
        ///  
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string RegDateStr => RegDate.ToString("yyyy-MM-dd");
        /// <summary>
        ///  
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ExpireDateStr => ExpireDate.ToString("yyyy-MM-dd");
    }
}